package by.grsu.hdm.model;

public class USBPort implements IPort {

	private String id;

	private IDevice connectedDevice;

	public USBPort(String id) {
		this.id = id;
	}

	public IDevice getConnectedDevice() {
		return connectedDevice;
	}

	public void connectDevice(IDevice connectedDevice) {
		this.connectedDevice = connectedDevice;
	}

	public void disconnectDevice() {
		this.connectedDevice = null;
	}

	public boolean hasConnectedDevice() {
		return this.connectedDevice != null;
	}

	public String getPortId() {
		return id;
	}

}
